import 'dart:convert';
import 'dart:async';
import 'package:kugou/src/models/new_sing_rank.dart';
import 'package:kugou/src/models/sing_rank.dart';
import 'package:kugou/src/resources/urls.dart';
import 'package:dio/dio.dart';

class SingApiProvider {
  Future<NewSingRank> getNewSingRank() async {
    Response res = await Dio().get(Urls.NEW_MUSIC_RANK);
    return NewSingRank.fromJson(json.decode(res.data));
  }

  Future<SingRank> getSingRank() async{
    Response res = await Dio().get(Urls.MUSIC_RANK);
    return SingRank.fromJson(json.decode(res.data));
  }
}
